var server = require("./server"),
	router = require("./router"),
	requestHandlers = require("./requestHandlers"),
	Data = require("./Data/index"),
	Exec = require("./Exec/index");

	
var handle = {}
handle["default"] = requestHandlers.defaultServer;
handle["/start"] = requestHandlers.start;
handle["/upload"] = requestHandlers.upload;
handle["/stop"] = function(){ process.exit();}
handle["/node_modules"] = requestHandlers.Error_404;

//server.start(80, router.route, handle);
var str = new Data.module ();
str.Get
(
	{ Name: "string" }, 
	function(s, r)
	{ 
		a = Exec.Class(s.Load); 
		a.Load(s);
		console.log(s.value);
	}
);

/*
test2.UpdateSave
(
	function(a,d)
	{
		var mo = new Data.module();
		mo.Name = "Test3";
		mo.Modules =[ test2._id ];
		mo.Render = "\
		this.Render = function(callback)\
		{ \
			var view = {\
			  title: \"Joe\",\
			  calc: function() {\
				return 2 + 4;\
			  }\
			};\
		\
		\
			var template = \"{{title}} spends {{calc}}\";\
			return mustache.to_html(template, view);\
		}\
		";
		mo.UpdateSave();
	}
);
*/

